package cn.edu.njuit.springbootdemo.http;

import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.List;

@Configuration
@RequiredArgsConstructor
public class MyWebMVCConfiguration implements WebMvcConfigurer {

    private final ResponseToXlsConverter responseToXlsConverter;

    @Override
    public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
        converters.add(responseToXlsConverter);
    }
}
